#include"HardData.h"
#include<fcntl.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<string>
#include<iostream>

HardData::HardData(const std::string &path){
  auto &&p = path.c_str();
  fd = open(p, O_RDONLY);
  if(fd == -1){
    fd = open("resources/html/error.html", O_RDONLY);
  }
  struct stat st;
  fstat(fd, &st);
  size = st.st_size;
}
